#include "common.h"
#include "d_oneround.h"
#include "decryption.h"

void decryption( word *ciphertext , word *key )
{
	ciphertext[2] = ciphertext[2] - key[2*r+3] ;
	ciphertext[0] = ciphertext[0] - key[2*r+2] ;
	for ( int i = r ; i >= 1 ; --i )
	{
		d_oneround( ciphertext , key[2*i+1] , key[2*i] ) ;
	}
	ciphertext[3] = ciphertext[3] - key[1] ;
	ciphertext[1] = ciphertext[1] - key[0] ;
}